public class ZillowLeadExtension {
    public ZillowLeadExtension(ApexPages.StandardController controller) {
			aLead = new Lead() ;
      
    }


    public Lead aLead ;
    public Lead getALead(){
        // if( aLead == null ) aLead = new Lead() ;    
        return aLead ;
    }
 
 
    public PageReference save() {
        
        PageReference pr ;
        try{
			ZillowService p = new ZillowService() ;
			ZillowTypes.PropertySearchResponse r = p.searchZillow( aLead.Street, aLead.City, aLead.State) ;
			aLead.Home_Value__c = r.getZEstimateAmount() ;
			insert aLead ;
			pr = new PageReference( '/' + aLead.id );
		}
		catch( ZillowTypes.ZillowException e){
			System.debug( '**** Caught Exception' +e ) ;
		}
        return pr ;
    }
}